#include "Zone.h"
#include "ConsoleSettings.h"

#include <windows.h>
#include <vector>

class Console
{
	private:

		std::vector<Zone> zones;

		ConsoleSettings * newOutput;
		ConsoleSettings * newInput;

		ConsoleSettings * oldOutput;
		ConsoleSettings * oldInput;

		void * iHandle;
		void * oHandle;

		bool isValidZoneName(char * name);

	public:

		Console(short width = 80, short height = 20);
		~Console();

		bool SetScreenSize(short width, short height);
		bool SetFont();

		bool SetOutputMode(unsigned long mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT);
		bool SetInputMode(unsigned long mode = ENABLE_ECHO_INPUT | ENABLE_EXTENDED_FLAGS | ENABLE_INSERT_MODE | ENABLE_LINE_INPUT | ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT);

		Zone * CreateZone(char * name, short left, short top, short right, short bottom);
		Zone * GetZone(char * name);
		bool DeleteZone(char * name);

};